//app.js
App({
  onLaunch: function () {
    if (!wx.cloud) {
      console.error('请使用 2.2.3 或以上的基础库以使用云能力')
    } else {
      wx.cloud.init({
        traceUser: true,
      })
    }
    

    this.backgroundAudioManager = wx.getBackgroundAudioManager()
    this.backgroundAudioManager.title = '同桌的你'
    // this.backgroundAudioManager.src = 'http://qiniu.awoo.co/classMate-laolang.mp3'
    this.backgroundAudioManager.play()

    this.globalData = {
      avatarID: '',
      entered: false,
      _openid: '',
      formid: '',
    }
  },
  onShow: function () {
    this.backgroundAudioManager.play();
   },
  onHide: function () {
    this.backgroundAudioManager.pause();
   }
  
})

